package ar.edu.itba.it.cg.grupo01.impl.scene;

import ar.edu.itba.it.cg.grupo01.api.scene.Scene;
import ar.edu.itba.it.cg.grupo01.impl.IntersectionFactory;
import static com.google.common.base.Preconditions.*;

public class SceneFactory {

	private IntersectionFactory intersectionFactory;

	public SceneFactory(final IntersectionFactory intersectionFactory) {
		checkNotNull(intersectionFactory,
				"Intersection factory should not be null");
		this.intersectionFactory = intersectionFactory;
	}

	public Scene forName(final String sceneName) {
		final InMemoryScene inMemoryScene = InMemoryScene.forName(sceneName);
		return inMemoryScene.getScene(intersectionFactory);
	}

}
